/*
 * @(#)DBActionResult.java 0.0.1-SNAPSHOT
 * Copyright Group B
 */

package grupb.upf.DBManager;

import java.util.List;

/**
 * <p>This interface manages the actions to the database and returns OK/KO and
 * the cause of the failure.</p>
 *
 * @version    0.0.1-SNAPSHOT
 * @author     Group B
 */
public interface DBActionResult {
    /**
     * Returns if the action is OK/KO.
     * @return The result of the action
     */
    boolean isOk();
    /**
     * This method gets a description of the error.
     * @return The error description
     */
    String getErrorMsg();
    /**
     * This method returns a description of the exeption.
     * @return The exeception description.
     */
    Throwable getException();
    /**
     * This method gets the result of the action.
     * @return The result of the action.
     */
    List getResult();
    /**
     * This method sets an error message.
     * @param aErrorMsg The error message
     */
    void setErrorMsg(String aErrorMsg);
    /**
     * This method sets an exeception.
     * @param aException The exeception
     */
    void setException(Throwable aException);
    /**
     * This method sets a result.
     * @param aResult The result
     */
    void setResult(List aResult);
}
